#include <stdio.h>
#include <string.h>

//在一个字符串中删除另一个字符串
void RemoveString(char *s, const char *s2)
{
    char *dest = strstr(s, s2);
    while(dest != NULL)
    {
        //往前覆盖的字符串的首地址
        char *next = dest + strlen(s2);
        while(*next != '\0')
        {
            *dest++ = *next++;
        }
        *dest = '\0';

        dest = strstr(s, s2);
    } 
}

int main()
{
    char s[] = "helloworld";
    char s2[] = "ll";
    RemoveString(s, s2);
    printf("%s\n", s);

    return 0;
}